package com.paypal.android.b;

import android.content.Context;
import android.graphics.drawable.GradientDrawable;
import android.graphics.drawable.GradientDrawable.Orientation;
import android.view.Display;
import android.view.View;
import android.view.View.MeasureSpec;
import android.view.WindowManager;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.RelativeLayout.LayoutParams;
import android.widget.ScrollView;
import com.paypal.android.MEP.PayPalActivity;
import com.paypal.android.MEP.e;
import com.paypal.android.a.g;

public abstract class n extends RelativeLayout
{
  private ScrollView a;
  private LinearLayout b;

  public n(Context paramContext)
  {
    super(paramContext);
    int k = PayPalActivity.a().getWindowManager().getDefaultDisplay().getWidth();
    int m = PayPalActivity.a().getWindowManager().getDefaultDisplay().getHeight();
    if (((k > m) && (m >= j)) || ((m > k) && (k >= j)));
    while (true)
    {
      if ((k > m) && (m > i))
        setPadding((k - j) / 2, (m - i) / 2, (k - j) / 2, (m - i) / 2);
      while (true)
      {
        setBackgroundColor(2130706432);
        a(paramContext);
        return;
        if ((m > k) && (k > i))
          setPadding((k - i) / 2, (m - j) / 2, (k - i) / 2, (m - j) / 2);
        else
          setPadding(10, 10, 10, 10);
      }
      j = i;
      i = 480;
    }
  }

  protected void a(Context paramContext)
  {
    this.a = new ScrollView(paramContext);
    this.a.setLayoutParams(new RelativeLayout.LayoutParams(-1, -1));
    GradientDrawable localGradientDrawable = new GradientDrawable(GradientDrawable.Orientation.TOP_BOTTOM, new int[] { -1, -987685, -987685, -987685 });
    localGradientDrawable.setCornerRadius(10.0F);
    localGradientDrawable.setGradientRadius(10.0F);
    this.a.setBackgroundDrawable(localGradientDrawable);
    this.a.setFillViewport(true);
    super.addView(this.a);
    this.b = new LinearLayout(paramContext);
    this.b.setOrientation(1);
    this.b.setLayoutParams(new RelativeLayout.LayoutParams(-1, -1));
    this.b.setBackgroundColor(0);
    this.a.addView(this.b);
    if (e.a().k() == 0)
    {
      localLinearLayout1 = new LinearLayout(PayPalActivity.a());
      localLayoutParams1 = new RelativeLayout.LayoutParams(-2, -2);
      localLayoutParams1.addRule(12);
      localLayoutParams1.addRule(11);
      localLinearLayout1.setLayoutParams(localLayoutParams1);
      localLinearLayout1.addView(g.a(paramContext, "banner-sandbox.png"));
      super.addView(localLinearLayout1);
    }
    while (e.a().k() != 2)
    {
      LinearLayout localLinearLayout1;
      RelativeLayout.LayoutParams localLayoutParams1;
      return;
    }
    LinearLayout localLinearLayout2 = new LinearLayout(PayPalActivity.a());
    RelativeLayout.LayoutParams localLayoutParams2 = new RelativeLayout.LayoutParams(-2, -2);
    localLayoutParams2.addRule(12);
    localLayoutParams2.addRule(11);
    localLinearLayout2.setLayoutParams(localLayoutParams2);
    localLinearLayout2.addView(g.a(paramContext, "banner-demo.png"));
    super.addView(localLinearLayout2);
  }

  public void addView(View paramView)
  {
    this.b.addView(paramView);
  }

  public abstract void d();

  public abstract void e();

  protected void onMeasure(int paramInt1, int paramInt2)
  {
    int i = 640;
    int j = 800;
    int k = 10;
    int m = View.MeasureSpec.getSize(paramInt1);
    int n = PayPalActivity.a().getWindowManager().getDefaultDisplay().getHeight();
    int i1;
    if (n - View.MeasureSpec.getSize(paramInt2) > 100)
    {
      i1 = 1;
      if (((m <= n) || (n < j)) && ((n <= m) || (m < j)))
        break label243;
    }
    while (true)
    {
      if ((m > n) && (n > i))
      {
        int i5 = (m - j) / 2;
        int i6 = (n - i) / 2;
        int i7 = (m - j) / 2;
        if (i1 != 0)
          label122: setPadding(i5, i6, i7, k);
      }
      while (true)
      {
        super.onMeasure(paramInt1, paramInt2);
        return;
        i1 = 0;
        break;
        k = (n - i) / 2;
        break label122;
        if ((n > m) && (m > i))
        {
          int i2 = (m - i) / 2;
          int i3 = (n - j) / 2;
          int i4 = (m - i) / 2;
          if (i1 != 0);
          while (true)
          {
            setPadding(i2, i3, i4, k);
            break;
            k = (n - j) / 2;
          }
        }
        setPadding(k, k, k, k);
      }
      label243: j = i;
      i = 480;
    }
  }
}

/* Location:           D:\Studium\Bachelorarbeit\BA Marcus Wobig\BA\BA\Decompiler\PicturePassword APK\Programm\PicturePassword_dex2jar.jar
 * Qualified Name:     com.paypal.android.b.n
 * JD-Core Version:    0.6.2
 */